package realQuestion.aiShu;

import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next();
        String b = scanner.next();
        System.out.println(add(a, b));

    }

    public  static String add(String a,String b){
        StringBuilder result = new StringBuilder();
        int carry=0;
        int i=0;
        int m=a.length()-1;
        int n=b.length()-1;
        while (i<a.length()||i<b.length()){

            int sum=carry;
            if (i<a.length()){
                sum+=a.charAt(i)-'0';
            }
            if (i<b.length()){
                sum+=b.charAt(i)-'0';
            }
            result.append(sum%2);
            carry=sum/2;
            i++;
        }
        if (carry!=0){
            result.append(carry);
        }
        return  result.reverse().toString();
    }

    public  static String add1(String a,String b){
        StringBuilder result = new StringBuilder();
        int carry=0;
        int m=a.length()-1;
        int n=b.length()-1;
        while (m>=0||n>=0){
            int sum=carry;
            if (m>=0){
                sum+=a.charAt(m)-'0';
                m--;
            }
            if (n>=0){
                sum+=b.charAt(n)-'0';
                n--;
            }
            result.append(sum%2);
            carry=sum/2;
          }
        if (carry!=0){
            result.append(carry);
        }
        return  result.reverse().toString();
    }


}
